package ee.ut.math.tvt.mitupead;

import java.awt.*;
import java.io.*;

import javax.imageio.ImageIO;
import javax.swing.*;

@SuppressWarnings("serial")
public class IntroUI extends JFrame implements Jadad  {
	JLabel kursus = new JLabel(jadad.poll());
	JLabel nimi = new JLabel(jadad.poll());
	JLabel juht = new JLabel(jadad.poll());
	JLabel juhtmail = new JLabel(jadad.poll());
	JLabel liikmed = new JLabel(jadad.poll());
	JPanel intro = new JPanel();
	
	IntroUI(){
		intro.setLayout(new BoxLayout(intro, BoxLayout.Y_AXIS));
		
		InputStream in = getClass().getResourceAsStream("/xhydra.png");
		try{
			Image logo1 = ImageIO.read(in);
			ImageIcon icon = new ImageIcon(logo1);
			JLabel logo = new JLabel(icon);
			add(logo, BorderLayout.SOUTH);
		}
		catch (IOException e){
	        e.printStackTrace();
		}
		
		intro.add(kursus);
		intro.add(nimi);
		intro.add(juht);
		intro.add(juhtmail);
		intro.add(liikmed);
		add(intro, BorderLayout.NORTH);
		
		
	}
	

}
